/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package smartgrid;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class SemanaAgregadaDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression ID;
	public final DoubleExpression domingoPrecoSUM;
	public final DoubleExpression domingoPrecoAVG;
	public final DoubleExpression segundaPrecoSUM;
	public final DoubleExpression segundaPrecoAVG;
	public final DoubleExpression tercaPrecoSUM;
	public final DoubleExpression tercaPrecoAVG;
	public final DoubleExpression quartaPrecoSUM;
	public final DoubleExpression quartaPrecoAVG;
	public final DoubleExpression quintaPrecoSUM;
	public final DoubleExpression quintaPrecoAVG;
	public final DoubleExpression sextaPrecoSUM;
	public final DoubleExpression sextaPrecoAVG;
	public final DoubleExpression sabadoPrecoSUM;
	public final DoubleExpression sabadoPrecoAVG;
	public final DateExpression data;
	public final StringExpression unidade;
	public final DoubleExpression domingoGastoSUM;
	public final DoubleExpression domingoGastoAVG;
	public final DoubleExpression segundaGastoSUM;
	public final DoubleExpression segundaGastoAVG;
	public final DoubleExpression tercaGastoSUM;
	public final DoubleExpression tercaGastoAVG;
	public final DoubleExpression quartaGastoSUM;
	public final DoubleExpression quartaGastoAVG;
	public final DoubleExpression quintaGastoSUM;
	public final DoubleExpression quintaGastoAVG;
	public final DoubleExpression sextaGastoSUM;
	public final DoubleExpression sextaGastoAVG;
	public final DoubleExpression sabadoGastoSUM;
	public final DoubleExpression sabadoGastoAVG;
	
	public SemanaAgregadaDetachedCriteria() {
		super(smartgrid.SemanaAgregada.class, smartgrid.SemanaAgregadaCriteria.class);
		ID = new IntegerExpression("ID", this.getDetachedCriteria());
		domingoPrecoSUM = new DoubleExpression("domingoPrecoSUM", this.getDetachedCriteria());
		domingoPrecoAVG = new DoubleExpression("domingoPrecoAVG", this.getDetachedCriteria());
		segundaPrecoSUM = new DoubleExpression("segundaPrecoSUM", this.getDetachedCriteria());
		segundaPrecoAVG = new DoubleExpression("segundaPrecoAVG", this.getDetachedCriteria());
		tercaPrecoSUM = new DoubleExpression("tercaPrecoSUM", this.getDetachedCriteria());
		tercaPrecoAVG = new DoubleExpression("tercaPrecoAVG", this.getDetachedCriteria());
		quartaPrecoSUM = new DoubleExpression("quartaPrecoSUM", this.getDetachedCriteria());
		quartaPrecoAVG = new DoubleExpression("quartaPrecoAVG", this.getDetachedCriteria());
		quintaPrecoSUM = new DoubleExpression("quintaPrecoSUM", this.getDetachedCriteria());
		quintaPrecoAVG = new DoubleExpression("quintaPrecoAVG", this.getDetachedCriteria());
		sextaPrecoSUM = new DoubleExpression("sextaPrecoSUM", this.getDetachedCriteria());
		sextaPrecoAVG = new DoubleExpression("sextaPrecoAVG", this.getDetachedCriteria());
		sabadoPrecoSUM = new DoubleExpression("sabadoPrecoSUM", this.getDetachedCriteria());
		sabadoPrecoAVG = new DoubleExpression("sabadoPrecoAVG", this.getDetachedCriteria());
		data = new DateExpression("data", this.getDetachedCriteria());
		unidade = new StringExpression("unidade", this.getDetachedCriteria());
		domingoGastoSUM = new DoubleExpression("domingoGastoSUM", this.getDetachedCriteria());
		domingoGastoAVG = new DoubleExpression("domingoGastoAVG", this.getDetachedCriteria());
		segundaGastoSUM = new DoubleExpression("segundaGastoSUM", this.getDetachedCriteria());
		segundaGastoAVG = new DoubleExpression("segundaGastoAVG", this.getDetachedCriteria());
		tercaGastoSUM = new DoubleExpression("tercaGastoSUM", this.getDetachedCriteria());
		tercaGastoAVG = new DoubleExpression("tercaGastoAVG", this.getDetachedCriteria());
		quartaGastoSUM = new DoubleExpression("quartaGastoSUM", this.getDetachedCriteria());
		quartaGastoAVG = new DoubleExpression("quartaGastoAVG", this.getDetachedCriteria());
		quintaGastoSUM = new DoubleExpression("quintaGastoSUM", this.getDetachedCriteria());
		quintaGastoAVG = new DoubleExpression("quintaGastoAVG", this.getDetachedCriteria());
		sextaGastoSUM = new DoubleExpression("sextaGastoSUM", this.getDetachedCriteria());
		sextaGastoAVG = new DoubleExpression("sextaGastoAVG", this.getDetachedCriteria());
		sabadoGastoSUM = new DoubleExpression("sabadoGastoSUM", this.getDetachedCriteria());
		sabadoGastoAVG = new DoubleExpression("sabadoGastoAVG", this.getDetachedCriteria());
	}
	
	public SemanaAgregadaDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, smartgrid.SemanaAgregadaCriteria.class);
		ID = new IntegerExpression("ID", this.getDetachedCriteria());
		domingoPrecoSUM = new DoubleExpression("domingoPrecoSUM", this.getDetachedCriteria());
		domingoPrecoAVG = new DoubleExpression("domingoPrecoAVG", this.getDetachedCriteria());
		segundaPrecoSUM = new DoubleExpression("segundaPrecoSUM", this.getDetachedCriteria());
		segundaPrecoAVG = new DoubleExpression("segundaPrecoAVG", this.getDetachedCriteria());
		tercaPrecoSUM = new DoubleExpression("tercaPrecoSUM", this.getDetachedCriteria());
		tercaPrecoAVG = new DoubleExpression("tercaPrecoAVG", this.getDetachedCriteria());
		quartaPrecoSUM = new DoubleExpression("quartaPrecoSUM", this.getDetachedCriteria());
		quartaPrecoAVG = new DoubleExpression("quartaPrecoAVG", this.getDetachedCriteria());
		quintaPrecoSUM = new DoubleExpression("quintaPrecoSUM", this.getDetachedCriteria());
		quintaPrecoAVG = new DoubleExpression("quintaPrecoAVG", this.getDetachedCriteria());
		sextaPrecoSUM = new DoubleExpression("sextaPrecoSUM", this.getDetachedCriteria());
		sextaPrecoAVG = new DoubleExpression("sextaPrecoAVG", this.getDetachedCriteria());
		sabadoPrecoSUM = new DoubleExpression("sabadoPrecoSUM", this.getDetachedCriteria());
		sabadoPrecoAVG = new DoubleExpression("sabadoPrecoAVG", this.getDetachedCriteria());
		data = new DateExpression("data", this.getDetachedCriteria());
		unidade = new StringExpression("unidade", this.getDetachedCriteria());
		domingoGastoSUM = new DoubleExpression("domingoGastoSUM", this.getDetachedCriteria());
		domingoGastoAVG = new DoubleExpression("domingoGastoAVG", this.getDetachedCriteria());
		segundaGastoSUM = new DoubleExpression("segundaGastoSUM", this.getDetachedCriteria());
		segundaGastoAVG = new DoubleExpression("segundaGastoAVG", this.getDetachedCriteria());
		tercaGastoSUM = new DoubleExpression("tercaGastoSUM", this.getDetachedCriteria());
		tercaGastoAVG = new DoubleExpression("tercaGastoAVG", this.getDetachedCriteria());
		quartaGastoSUM = new DoubleExpression("quartaGastoSUM", this.getDetachedCriteria());
		quartaGastoAVG = new DoubleExpression("quartaGastoAVG", this.getDetachedCriteria());
		quintaGastoSUM = new DoubleExpression("quintaGastoSUM", this.getDetachedCriteria());
		quintaGastoAVG = new DoubleExpression("quintaGastoAVG", this.getDetachedCriteria());
		sextaGastoSUM = new DoubleExpression("sextaGastoSUM", this.getDetachedCriteria());
		sextaGastoAVG = new DoubleExpression("sextaGastoAVG", this.getDetachedCriteria());
		sabadoGastoSUM = new DoubleExpression("sabadoGastoSUM", this.getDetachedCriteria());
		sabadoGastoAVG = new DoubleExpression("sabadoGastoAVG", this.getDetachedCriteria());
	}
	
	public ContractDetachedCriteria createContractCriteria() {
		return new ContractDetachedCriteria(createCriteria("contract"));
	}
	
	public SemanaAgregada uniqueSemanaAgregada(PersistentSession session) {
		return (SemanaAgregada) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public SemanaAgregada[] listSemanaAgregada(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (SemanaAgregada[]) list.toArray(new SemanaAgregada[list.size()]);
	}
}

